{include file="user:header" /}
<script type="text/javascript" src="/static/plugin/my97/wdatepicker.js"></script>
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content">
<div class="row"> 
  <!--头部面包屑-->
  <div class="col-lg-12">
    <div class="ibox">
      <div class="ibox-content-p5 text-center">
        <div class="breadcrumb"> <i class="fa fa-home m-r5" style=" font-size: 16px;"></i>
          <li><a href="/user/index">首页</a></li>
          <li class="active">订单管理</li>
        </div>
      </div>
    </div>

	  
    <!--表格-->
    <div class="ibox float-e-margins">
		<div class="ibox-title">
                        <h5>订单管理</h5>
                        
        </div>
		<div class="ibox-content">
			
	<div >
        <form action="{:url('myorder')}" method="get">
            <input type="text" name="keywords" placeholder="请输入订单编号" class="form-control m-r5" style=" width: 150px; float: left;" value="{$keywords}">
<input type="text" name="starttime" id="d4311" onfocus="WdatePicker({maxDate:'#F{ $dp.$D(\'d4312\')}'})"  placeholder="开始时间" class="form-control m-r5 Wdate" style=" width: 150px;height:30px;float: left;" value="{$starttime}" readonly>
<input type="text" name="endtime" id="d4312" onfocus="WdatePicker({minDate:'#F{ $dp.$D(\'d4311\')}'})"  placeholder="截止时间" class="form-control m-r5 Wdate" style=" width: 150px;height:30px;float: left;" value="{$endtime}" readonly>
		<button type="submit" class="btn btn-w-m btn-success">搜索</button>
        </form>
			</div>

            <div class="tabs-container">
            <ul class="nav nav-tabs">
                <li<?php if(-1==$state){ ?> class="active"<?php } ?>><a href="{:url('myorder','state=-1')}" aria-expanded="true">全部</a></li>
                <li<?php if(0==$state){ ?> class="active"<?php } ?>><a href="{:url('myorder','state=0')}" aria-expanded="false">待支付</a></li>
                <li<?php if(1==$state){ ?> class="active"<?php } ?>><a href="{:url('myorder','state=1')}" aria-expanded="false">已支付</a></li>
            </ul>

                <div class="tab-content">
      <table class="table table-bordered">
        <thead>
          <tr>
            <th>订单编号</th>
            <th>金额</th>
              <th>支付状态</th>
              <th>是否创建</th>
            <th>下单日期</th>
              <th>操作</th>
          </tr>
        </thead>
        <tbody>

        {volist name="list" id="vo"}
          <tr>
              <td>{$vo['order_sn']}</td>
              <td>{$vo['sum']}</td>
              <td><?php echo 1==$vo['state_pay']?'<span style="color:green">已支付</span>':'<span style="color:red">待支付</span>'; ?></td>
              <td><?php echo 1==$vo['state_create']?'<span style="color:green">已创建</span>':'<span style="color:red">待创建</span>'; ?></td>
            <td>{$vo['time']|date="Y-m-d H:i:s"}</td>
            <td>
                <?php if(0==$vo['state_pay']){ ?>
                <a href="{:url('pay',['oid'=>$vo['id']])}" class="btn btn-w-m btn-info">支付</a>
                <?php } ?>
                <a href="{:url('myorderinfo',['oid'=>$vo['id']])}" class="btn btn-w-m btn-info">详情</a>
            </td>
          </tr>
         {/volist}

        {empty name="list"}
        <tr>
            <td colspan="5" style="text-align: center;">暂无数据</td>
        </tr>
        {/empty}

        </tbody>
      </table>
                </div>
            </div>


      <div class="row">
		  
        <div class="col-sm-6">
          <div class="dataTables_info" ></div>
        </div>

        <div class="col-sm-6">
          <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
              {$res|raw}
          </div>
        </div>

      </div>


      </div>
    </div>
    <!----> 
  </div>
</div>

<!-- 全局js -->
{include file="user:footer" /}